﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ScriptEditor.Commands
{
    class Command_ChangeScene : Command
    {
        public GameState sceneName
        {
            get
            {
                return Enum.TryParse(Value1, out GameState result) ? result : GameState.Vn;
            }
            set
            {
                Value1 = value.ToString();
            }
        }
        public Command_ChangeScene()
        {
            CommandType = COMMANDTYPE.ChangeScene;
            sceneName = GameState.Vn;
            Wait = true;
        }
        public Command_ChangeScene(GameState SceneName)
        {
            CommandType = COMMANDTYPE.ChangeScene;
            sceneName = SceneName;
            Wait = true;
        }
        public override string ToString()
        {
            return CommandType.ToString() + ":\n" + "改变游戏场景:" + sceneName.ToString();
        }
    }
}
